<template>
  <div>
    <a-input-number ref="input1" step="1" class="notremind" v-model="myValue" @blur="setValue" @pressEnter="setValue" style="width: 100%"/>
  </div>
</template>

<script>
/* eslint-disable */
    export default {
      // name:
      data() {
        return {
          myValue:this.value,
        }
      },
      methods: {
        setValue(){
          this.$emit('input', this.myValue);
          this.$emit('b', this.myValue+1);
        },
      },
      props:{
        value:{// 数字框默认值
          type:Number,
          default:"0",
        },
      },

      watch:{
        value(newVal) {
          // this.myValue = Number(newVal.toFixed(2));
        //   this.$emit('input', this.myValue);
        },
        // myValue(newVal) {
        //   this.$emit('input', newVal)
        // },
      },
    }
</script>

<style scoped>
  .notremind{

  }
  .remind{
    border:2px solid #FF0000;
  }
  /* >>>.ant-input-number-input{
    text-align:right;
  }
  >>>.ant-input-number-handler-wrap{
    width: 0;
  } */
</style>
